<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>

<body>
    <script>
        //【2】reverse: 将原来的数组倒过来排序，原来的数组改变。
        var arr = [1, 3, 4, 2, 6, 5];
        var res = arr.reverse();
        console.log(arr); //[5, 6, 2, 4, 3, 1]
        console.log(res); //[5, 6, 2, 4, 3, 1]
    </script>
</body>

</html>